<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>化验单</title>
    <!-- Bootstrap -->
    <link href="__HCSS__bootstrap.css" rel="stylesheet">
    <link rel="stylesheet" href="__HCSS__reset.css"/>
    <link rel="stylesheet" href="__HCSS__common.css"/>
    <link rel="stylesheet" href="__HCSS__index.css"/>
    <!--[if lt IE 9]>
    <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <script>
        function check(id) {
            var frameSrc = "{:U('hyd/sanjiliandong')}"+"?id="+id;
            $("#hylx").attr("src", frameSrc);
            $('#hylxModal').modal({ show: true, backdrop: 'static' });
        }
    </script>
    <style>
        .title {
            width: 352px;
            display: inline-block;
            vertical-align: top;
        }

        #one_yi, #two_er {
            border-top: 1px solid #dddddd;
            width: 352px;
            display: inline-block;
            vertical-align: top;
            height: 350px;
            overflow: auto;
        }

        #one_yi li, #two_er li, #three_san li {
            width: 100%;
            line-height: 30px;
            border-bottom: 1px solid #dddddd;
            padding: 0 10px;
            cursor: pointer;
        }

        .set {
            background: #15ACF3;
            color: #FFFFFF;
        }

        #two_er ul:not(:first-child) {
            display: none;
        }

        #three_san ul:not(:first-child) {
            display: none;
        }

        .name_title {
            width: 100%;
            margin: 15px 0;
        }

        ::-webkit-scrollbar {
            width: 2px;
        }

        /* 滚动槽 */
        ::-webkit-scrollbar-track {
            -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
            border-radius: 10px;
        }

        /* 滚动条滑块 */
        ::-webkit-scrollbar-thumb {
            border-radius: 10px;
            background: rgba(0, 0, 0, 0.1);
            -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.5);
        }

        ::-webkit-scrollbar-thumb:window-inactive {
            background: rgba(0, 0, 0, 0.4);
        }
    </style>
</head>
<body>
<div id="Laboratory" style="width:750px;padding:0 20px;margin:0 auto;"> <!--背景色、边框、阴影-->
    <div class="name_title">
        <p class="title"><b>请选择化验类型</b></p>

        <p class="title"><b>请选择化验项</b></p>
    </div>
    <form action="" style="border: 1px solid #ddd;border-right: none" method="post">
        <div id="wrap">
            <select class="select Validform_error" size="1" name="assay_class_id" datatype="*" nullmsg="请选择" onchange="onchangeassay($(this))">
                <option value="" selected="" disabled="disabled">请选择</option>
                <volist name="assay" id="v">
                    <option value="{$v.id}">{$v.title}</option>
                </volist>
            </select>
            <div id="two_er">

            </div>
        </div>
    </form>
</div>
<a class="btn btn-danger text-center" id="btndd"  style="position: relative;top:25px;left:375px;">关闭</a>
<script src="__HJS__jquery-2.1.1.js"></script>
<script src="__HJS__bootstrap.js"></script>
<script>
    $("#btndd").click(
            function(){
                window.parent.$('#hylxModal').modal("hide");
            }
    );
    $('#one_yi li').click(function () {
        var i = $(this).index();
        $(this).addClass('set').siblings().removeClass('set');
        $('#two_er ul').eq(i).show().siblings().hide();
    });
    $('#two_er ul li').click(function () {
        var i = $(this).index();
        $(this).addClass('set').siblings().removeClass('set');
        $('#three_san ul').eq(i).show().siblings().hide();
    });
    function onchangeassay(jqObj){
        var assay_class_id = jqObj.val();
        var assaycheckBox = $('#two_er');
             assaycheckBox.html('');
        $.ajax({
            url: '{:U("HealthRecord/GetAssaylist")}?assay_class_id=' + assay_class_id,
            type: 'post',
            enctype: 'multipart/form-data',
            success: function (data) {
                $.each(data, function (i, item) {
//                    diseaseSelect.append('<option value="' + item.id + '" >' + item.title + '</option>');
                  var diseaseHtml="<div class='skin-minimal check-box' style='margin-top: 5px'> <div class='check-box'> <input type='checkbox' name='disease_id[]' value='"+item.title+"'>"+item.title+"</div> </div>";
                       assaycheckBox.append(diseaseHtml);
                });
            },
        });
    }
</script>
</body>
</html>